-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[experimental] Upgrade dracut module: Update /usr mounting solution #1202
base: main
Are you sure you want to change the base?
Conversation
Thank you for contributing to the Leapp project!Please note that every PR needs to comply with the Leapp Guidelines and must pass all tests in order to be mergeable.
Packit will automatically schedule regression tests for this PR's build and latest upstream leapp build. If you need a different version of leapp, e.g. from PR#42, use It is possible to schedule specific on-demand tests as well. Currently 2 test sets are supported,
See other labels for particular jobs defined in the Please open ticket in case you experience technical problem with the CI. (RH internal only) Note: In case there are problems with tests not being triggered automatically on new PR/commit or pending for a long time, please contact leapp-infra. |
/packit build |
67da1cd
to
bc5fd7e
Compare
/packit build |
Originally we had implemented our own mount_usr.sh script, which took care about mounting the /usr when it is present on separate partition / mountpoint. It took care also about LVM activation. However, it has been problematic in various cases (e.g. when device needed more time for initialisation - e.g. when connected using FC). Let's use instead existing system solutions, starting the upgrade.target after initrd-fs.target (instead of just basic.target). TBD jira: RHEL-3344
bc5fd7e
to
1fd6b1c
Compare
@pirat89 I have tried this patch with a VM that uses a separate virtio block device for /usr and it worked fine. I have verified that /usr is mounted, and that Do you happen to have any recollection on the conditions when this patch was not working? |
@MichalHe I have reproduced the problem with:
note that for the screenshot I had to re-run it, that's why you see an extra msg about |
@pirat89 By default, systemd will mount only
into
Also, if the device is an LVM's logical volume and the source system is using Otherwise, the upgrade went OK. |
Looking at when What we could do in theory is to run systemd-fstab-generator before reboot and try keeping the generated |
So, the issue is essentially twofold:
To tell dracut to include key LVM binaries, and an udev rule that takes care of triggering these commands. I have tried booting into the initramfs, and the lv for 2) We want to ditch running
resulting in the
into
Now systemd is very strict how mount units should be named, so we need to rename the mount units to reflect the new mount target. For example, for
Finally, we copy the contents of
And we have an upgrade initramfs that a) autoactivates LVM, b) uses systemd to mount entries from 😁 |
Add LVM autoactivation mechanism to the upgrade initramfs. The core of the mechanism is based on a special udev rule that is triggered when a new device is detected. The rule then calls two lvm binaries (which are also included into the upgrade initrams) to activate the volume groups and logical volumes.
Originally we had implemented our own mount_usr.sh script, which took care about mounting the /usr when it is present on separate partition / mountpoint. It took care also about LVM activation.
However, it has been problematic in various cases (e.g. when device needed more time for initialisation - e.g. when connected using FC). Let's use instead existing system solutions, starting the upgrade.target after initrd-fs.target (instead of just basic.target).
jira: RHEL-3344
Cooperating with: prajnoha, lnykryn, pvalena.
do_not_merge: just exprimenting right now. if we find working solution, I will update yet commit msg at minimum.
Additional notes
initrd-parse-etc.service
, but the inside the unit file:initrd-cleanup
service includes also switch-root, which we do not want to happen at all and due to isolation it basically kills out upgrade process.Update: